package com.wyc.apiPassenger.service.impl;

import com.wyc.apiPassenger.feign.OrderFeignClient;
import com.wyc.apiPassenger.service.OrderService;
import com.wyc.internalCommon.constant.OrderConstant;
import com.wyc.internalCommon.request.OrderInfo;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderFeignClient orderFeignClient;

    @Override
    public ApiResult<OrderInfo> add(OrderInfo order) {
        return orderFeignClient.add(order);
    }

    /**
     * 取消订单
     * @param orderId
     * @param identity 取消人的身份标识（1.乘客 2.司机3.平台）
     * @return
     */
    @Override
    public ApiResult cancelOrder(Long orderId, String identity) {
        return orderFeignClient.cancelOrder(orderId,identity);
    }

}
